<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SWM34S_LVGL7.11_SWMUI: C:/Users/DELL/Desktop/Commit/lvgl/SWM34S_LVGL7.11_SWMUI_20230515/APP/BSP/dev_sdio.c 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SWM34S_LVGL7.11_SWMUI<span id="projectnumber">&#160;V7.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0ca16891106f5a3e9ad635a0d6c5f98f.html">APP</a></li><li class="navelem"><a class="el" href="dir_4ca18d753a70f6eada20fde478bd3fc8.html">BSP</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">dev_sdio.c</div></div>
</div><!--header-->
<div class="contents">
<a href="dev__sdio_8c.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="preprocessor">#include &quot;<a class="code" href="dev__sdio_8h.html">dev_sdio.h</a>&quot;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="dev__sdio_8c.html#acf47901f5b4b624afafb02d59e04ce9c">   29</a></span>uint8_t <a class="code hl_function" href="dev__sdio_8c.html#acf47901f5b4b624afafb02d59e04ce9c">sdcard_init</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span>{</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span>    PORT_Init(PORTM, PIN2, PORTM_PIN2_SD_CLK, 0);</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span>    PORT_Init(PORTM, PIN4, PORTM_PIN4_SD_CMD, 1);</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>    PORT_Init(PORTM, PIN5, PORTM_PIN5_SD_D0,  1);</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span>    PORT_Init(PORTM, PIN6, PORTM_PIN6_SD_D1,  1);</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>    PORT_Init(PORTN, PIN0, PORTN_PIN0_SD_D2,  1);</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>    PORT_Init(PORTN, PIN1, PORTN_PIN1_SD_D3,  1);</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span>    <span class="keywordflow">return</span> SDIO_Init(42 * 1000000UL); <span class="comment">/* SDIO 时钟上限 52 MHz, 具体频率数值涉及PCB走线, 请结合实际设定 */</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span>}</div>
<div class="ttc" id="adev__sdio_8c_html_acf47901f5b4b624afafb02d59e04ce9c"><div class="ttname"><a href="dev__sdio_8c.html#acf47901f5b4b624afafb02d59e04ce9c">sdcard_init</a></div><div class="ttdeci">uint8_t sdcard_init(void)</div><div class="ttdoc">配置 SDIO 模块, 建立与 SD 卡的通讯</div><div class="ttdef"><b>Definition:</b> <a href="dev__sdio_8c_source.html#l00029">dev_sdio.c:29</a></div></div>
<div class="ttc" id="adev__sdio_8h_html"><div class="ttname"><a href="dev__sdio_8h.html">dev_sdio.h</a></div><div class="ttdoc">SDIO 驱动 SD 卡</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
